package com.main.utility;

import com.main.ui.model.Person;

public class PersonBuilder {
	
	private Person person = new Person();
	
	public PersonBuilder setFirstName(String firstName){
		person.setFirstName(firstName);
		return this;
	}
	
	public PersonBuilder setLastName(String lastName){
		person.setLastName(lastName);
		return this;
	}
	
	public PersonBuilder setGender(String gender){
		person.setGender(gender);
		return this;
	}
	
	public PersonBuilder setAge(int age){
		person.setAge(age);
		return this;
	}
	
	public Person build(){
		return person;
	}
	
	public Person build(String firstName, String lastName, int age, String gender){
		Person person = new Person();
		person.setFirstName(firstName);
		person.setLastName(lastName);
		person.setGender(gender);
		person.setAge(age);
		return person;
	}
}
